Change initial_point default strategy from "prior" to "moment"#5140
Conversation
3fb0e1a to
88cce65
Compare
Codecov Report
@@ Coverage Diff @@
## main #5140 +/- ##
==========================================
+ Coverage 79.15% 79.17% +0.01%
==========================================
Files 88 88
Lines 14311 14316 +5
==========================================
+ Hits 11328 11334 +6
+ Misses 2983 2982 -1
|
88cce65 to
d17d0b2
Compare
d17d0b2 to
b8baccf
Compare
|
Getting some weird parallel sampling test failures only on Windows. Perhaps related to #4904? |
a1fb23e to
b97a157
Compare
|
I am inclined to defaulting back to a prior sample if a distribution does not have a moment, perhaps with a UserWarning like
This would allow users to more gradually implement their own distributions. We still have a check added in this PR that all our standard distributions have moments implemented. |
|
I like the fallback plus warning idea. Maybe include a link to the relevant docs section on implementing custom distributions? |
895b44c to
15e3632
Compare
15e3632 to
efe1b88
Compare
|
We have very few moments missing, and it was consensus that this should no longer block the beta release. I have added the known missing moments to |
efe1b88 to
c6268c5
Compare
|
Still have those surprising failing tests on Windows alone... |
To me it looks like the same problem as #4904 - broadcasts are not correctly propagated through Cast operations. |
a557fc9 to
dc47cf1
Compare
|
Tests are passing with the latest Aesara version |
Co-authored-by: Michael Osthege <michael.osthege@outlook.com>
dc47cf1 to
c6e11eb
Compare
This PR adds a check that we have moments for all distributions and changes the default initial point strategy from
"prior"to"moment"Also added a check in the default test moments that the logp of the provided moment is finite.
Closes #5009
Related to #5078
We also need to decide whether we default to a draw from the prior if a distribution does not have a
get_momentimplemented or if we just fail in that case (which is what is happening now). It would be trivial to allow this with a try/except block